<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    

        <script>

            var arr=[100,true,'hhh',111,222,44]
            console.log(arr);

            // 获取数组长度
            console.log(arr.length);

            // 修改数组长度
            // arr.length = 2;

            console.log(arr);

            // 取出数组中索引为二的值
            console.log(arr[1])

            // 设置数据
            arr[1] =500;

            console.log(arr);

            // 遍历数组
            for(var i;i<arr.length;i++){
                console.log(arr[i]);
            }

            
        </script>

</body>
</html>